package com.health.memberbackstage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.health.memberbackstage.mapper.AppointmentMapper;
import com.health.memberbackstage.mapper.MemberMapper;
import com.health.memberbackstage.pojo.Appointment;
import com.health.memberbackstage.pojo.Member;
import com.health.memberbackstage.service.AppointmentService;
import com.health.memberbackstage.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Appointment> implements AppointmentService {

    @Autowired
    private AppointmentMapper appointmentMapper;

    @Override
    public boolean addAppointment(Appointment appointment) {
        int res = appointmentMapper.insertAppointment(appointment);
        if (res >= 1){
            return true;
        }
        return false;
    }
}
